<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>WebAPI</title>
</head>
<body>
    <div>点这里</div>
    <script>
        let div = document.querySelector('div');
        div.onclick = function() {
            console.log('哒哒按下了鼠标~');
        }
    //    div.onmousemove = function() {
    //     console.log('哒哒的鼠标在移动~');
    //    }
       div.onmouseenter = function() {
        console.log('哒哒的鼠标进来啦!');
       }
       div.onmouseleave = function() {
        console.log('哒哒的鼠标逃跑啦!');
       }
    </script>
</body>
</html>